import React from "react";
import Button from "./button";
import { Meta, StoryObj } from "@storybook/react";

const buttonMeta: Meta<typeof Button> = {
  title: "第四章：Button",
  component: Button,
};

export const Default: StoryObj<typeof Button> = {
  render: () => <Button>Default Button</Button>,
};
Default.storyName = "默认按钮样式";
export const ButtonWithSize: StoryObj<typeof Button> = {
  render: () => (
    <>
      <Button size="lg">large button</Button>
      <Button size="sm">small button</Button>
    </>
  ),
};
ButtonWithSize.storyName = "不同尺寸的按钮";
export const ButtonWithType: StoryObj<typeof Button> = {
  render: () => (
    <>
      <Button btnType="primary">primary button</Button>
      <Button btnType="danger">danger button</Button>
      <Button btnType="link" href="https://google.com">
        link button
      </Button>
    </>
  ),
};
ButtonWithType.storyName = "不同类型的按钮";

export default buttonMeta;
